package zhyh.kit.excel;

import java.util.HashMap;
import java.util.Map;

public class ExcelIOBaseModel
{
	protected Map<String, String> errorMessages;

	public String getErrorMessage(String key) {
		if (errorMessages != null && errorMessages.size() > 0) {
			return errorMessages.get(key);
		}
		return null;
	}

	public Map<String, String> getErrorMessages() {
		return (errorMessages == null || errorMessages.size() < 1) ? null : errorMessages;
	}

	public void putErrorMessage(String key, String value) {
		if (errorMessages == null)
			errorMessages = new HashMap<String, String>();
		errorMessages.put(key, value);
	}
}
